package com.liwei.appio;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class MyApp3 {
    public static void main(String[] args) {
        String temp = "";
        char[] chars = new char[1024 * 1024 * 10];
        String path = "d:\\bb.txt";
        try {
            FileReader fileReader = new FileReader(path);
            int read = 0;
            StringBuffer stringBuffer = new StringBuffer();
            while ( (read = fileReader.read(chars, 0, chars.length))!=-1){
                String bb= new String(chars,0,read);
                stringBuffer.append(bb);
            }
            temp = stringBuffer.toString();
            fileReader.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
        System.out.println(temp);
    }
}
